package com.javafactroy.kunlong.data.service;

import com.javafactroy.kunlong.data.dao.mysql.EmpInfoApiMapper;
import com.javafactroy.kunlong.data.entity.EmpInfoApiEntity;
import com.javafactroy.kunlong.data.dto.EmpInfoApiDto;
import com.javafactroy.kunlong.base.dto.TQueryParam;
import com.javafactroy.kunlong.base.model.ReturnPageInfo;

import org.apache.ibatis.annotations.Param;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
*  @author raymond.lei@163.com
*  @date   2023-11-30 14:31:55

*/
@Slf4j
@Service
public class EmpInfoApiService extends ApiService<EmpInfoApiDto, EmpInfoApiEntity, EmpInfoApiMapper> {

    public EmpInfoApiService() {
        init();

    }

    void init() {
        iquerySome = (EmpInfoApiDto dto) -> {
        };

        iquerySomeList = (List<EmpInfoApiDto> list) -> {
            list.forEach(i -> iquerySome.querySome(i));
        };
    }

    public ReturnPageInfo<EmpInfoApiDto> queryParam(@Param("queryParam") TQueryParam<EmpInfoApiDto> queryParam) {
        if ( queryParam.getParam() == null ) {
            queryParam.setParam(new EmpInfoApiDto());
        }

        return super.queryParam(queryParam);

    }
}
